package project.menu.mastermenu;

import project.controllers.CreatorObject;
import project.menu.IMenu;
import project.menu.IMenuItem;
import project.work.Navigator;
import controllers.IAutoservice;


public class CreatorMaster implements IMenuItem{
	private String name= "Add Master";
	private final Integer id= 3;
	private static IMenu submenu;
	private Navigator n;
	
	public CreatorMaster(){
		n=Navigator.getInstance();
	}


		
	public static void setSubmenu(IMenu menu){
		 submenu=menu;
	}
	
	public Integer getId() {
		return id;
	}


	
	public void action(IAutoservice aut) {
		//addmaster
		aut.addMaster(CreatorObject.addMaster());
		n.drawMenu(submenu);
	}

	
	public String getNameItem() {
		
		return name;
	}

}
